package com.xiaoxi.exam.bean.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.util.Objects;

@Data
@ApiModel
public class AddOrderRequest extends BaseOrderRequest {

    @ApiModelProperty(value = "订单id")
    private String preId;

    public boolean invalid() {
        return Objects.isNull(getOrderInfos()) || getOrderInfos().isEmpty() || StringUtils.isEmpty(getOpenId());
    }
}
